﻿/*------------------------------------------------
// File Description: InboundProduct DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-05-04 14:47:10
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 入库单物料
    /// </summary>
    [Table(nameof(InboundProduct))]
    public class InboundProduct : BaseEntity
    {
        private string _inboundNo = string.Empty;
        private string _barCode = string.Empty;
        private string _productCode = string.Empty;
        private string _productName = string.Empty;
        private string _batchNo = string.Empty;
        private string _location;
        private string _areaCode;
        private string _areaName;
        private string _warehouseCode;
        private string _warehouseName;
        private string _productSpecs;

        #region Public Property

        ///<Summary>
        /// 入库单号
        ///</Summary>
        public string InboundNo
        {
            get { return string.IsNullOrWhiteSpace(_inboundNo) ? string.Empty : _inboundNo; }
            set { _inboundNo = value; }
        }

        ///<Summary>
        /// 存货类型
        ///</Summary>
        public Enum.InventoryType InventoryType { get; set; }

        ///<Summary>
        /// 存货条码
        ///</Summary>
        public string BarCode
        {
            get { return string.IsNullOrWhiteSpace(_barCode) ? string.Empty : _barCode; }
            set { _barCode = value; }
        }

        ///<Summary>
        /// 物料编码
        ///</Summary>
        public string ProductCode
        {
            get { return string.IsNullOrWhiteSpace(_productCode) ? string.Empty : _productCode; }
            set { _productCode = value; }
        }

        ///<Summary>
        /// 物料名称
        ///</Summary>
        public string ProductName
        {
            get { return string.IsNullOrWhiteSpace(_productName) ? string.Empty : _productName; }
            set { _productName = value; }
        }

        ///<Summary>
        /// 物料规格
        ///</Summary>
        public string ProductSpecs
        {
            get { return string.IsNullOrWhiteSpace(_productSpecs) ? string.Empty : _productSpecs; }
            set { _productSpecs = value; }
        }

        ///<Summary>
        /// 批次号
        ///</Summary>
        public string BatchNo
        {
            get { return string.IsNullOrWhiteSpace(_batchNo) ? string.Empty : _batchNo; }
            set { _batchNo = value; }
        }

        ///<Summary>
        /// 仓库代码
        ///</Summary>
        public string WarehouseCode
        {
            get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
            set { _warehouseCode = value; }
        }

        ///<Summary>
        /// 仓库名称
        ///</Summary>
        public string WarehouseName
        {
            get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
            set { _warehouseName = value; }
        }

        ///<Summary>
        /// 库区代码
        ///</Summary>
        public string AreaCode
        {
            get { return string.IsNullOrWhiteSpace(_areaCode) ? string.Empty : _areaCode; }
            set { _areaCode = value; }
        }

        ///<Summary>
        /// 库区名称
        ///</Summary>
        public string AreaName
        {
            get { return string.IsNullOrWhiteSpace(_areaName) ? string.Empty : _areaName; }
            set { _areaName = value; }
        }

        ///<Summary>
        /// 库位号
        ///</Summary>
        public string Location
        {
            get { return string.IsNullOrWhiteSpace(_location) ? string.Empty : _location; }
            set { _location = value; }
        }

        ///<Summary>
        /// 收货数量
        ///</Summary>
        public decimal ReceiveQuantity { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 入库单物料
        /// </summary>
        public virtual DbSet<InboundProduct> InboundProducts { get; set; }
    }
}